<template>
   <div class="itembox">
          <div class="up">
              <h2>{{items.title}}</h2>
              <div class="time">{{getMyDate(items.posttime)}}</div>
          </div>
          <div class="middle">
              {{items.content}}
          </div>
          <div class="down">
              <div class="kind">
                  所属分类：
                  <span>{{items.classify}}</span>
              </div>
              <div class="author">
                  作者：
                  <span>{{items.author}}</span>
              </div>
          </div>
    </div>
</template>

<script>
import common from '../assets/js/common'
export default {
    name:'ItemBox',
    // props:['items'],
    props:{
        items:{
            type:Object,
            default:function(){
                return {}
            }
        }
    },
    // mounted() {
    //     console.log(this.itemList)
    // },
    methods: {
        getMyDate(time){
           return common.myDate(time,3)
        }
    },
}
</script>

<style scoped lang="less">
    .itembox{padding:30px 0px;
     .up{display: flex;justify-content: space-between;align-items: center;padding-bottom: 10px;
        h2{
            width: 750px;color: #333;font-size: 25px;
            word-break: break-all;
            word-wrap: break-word;
            white-space: normal;
        }
         .time{font-size: 14px;color: #888;}
    }
   
    .middle{background-color: #F6F6F6;border-radius: 5px;padding: 15px 10px;font-size: 18px;line-height: 1.8em;color: #444;margin-bottom: 10px;text-align: justify;}
    .down{display: flex;justify-content: space-between;font-size: 14px;color: #888;
    span{
        font-size: 16px;color: #666;
    } 
    }
    }
</style>